3.426 \(\int \frac{\cos ^2(c+d x) \cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=35 \[ -\frac{\cot (c+d x)}{a^2 d}+\frac{2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac{x}{a^2} \]

[Out]

x/a^2 + (2*ArcTanh[Cos[c + d*x]])/(a^2*d) - Cot[c + d*x]/(a^2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.148947, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {2869, 2757, 3770, 3767, 8} \[ -\frac{\cot (c+d x)}{a^2 d}+\frac{2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac{x}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^2*Cot[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]

[Out]

x/a^2 + (2*ArcTanh[Cos[c + d*x]])/(a^2*d) - Cot[c + d*x]/(a^2*d)

Rule 2869

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(
m_), x_Symbol] :> Dist[a^(2*m), Int[(d*Sin[e + f*x])^n/(a - b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f,
 n}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p] && EqQ[2*m + p, 0]

Rule 2757

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int[Expan
dTrig[(a + b*sin[e + f*x])^m*(d*sin[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] &
& IGtQ[m, 0] && RationalQ[n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\cos ^2(c+d x) \cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac{\int \csc ^2(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac{\int \left (a^2-2 a^2 \csc (c+d x)+a^2 \csc ^2(c+d x)\right ) \, dx}{a^4}\\ &=\frac{x}{a^2}+\frac{\int \csc ^2(c+d x) \, dx}{a^2}-\frac{2 \int \csc (c+d x) \, dx}{a^2}\\ &=\frac{x}{a^2}+\frac{2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac{\operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}\\ &=\frac{x}{a^2}+\frac{2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac{\cot (c+d x)}{a^2 d}\\ \end{align*}

Mathematica [B]  time = 0.356838, size = 98, normalized size = 2.8 \[ \frac{\left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^4 \left (2 (c+d x)+\tan \left (\frac{1}{2} (c+d x)\right )-\cot \left (\frac{1}{2} (c+d x)\right )-4 \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )+4 \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )\right )}{2 d (a \sin (c+d x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^2*Cot[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]

[Out]

((Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4*(2*(c + d*x) - Cot[(c + d*x)/2] + 4*Log[Cos[(c + d*x)/2]] - 4*Log[Sin
[(c + d*x)/2]] + Tan[(c + d*x)/2]))/(2*d*(a + a*Sin[c + d*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.138, size = 74, normalized size = 2.1 \begin{align*}{\frac{1}{2\,d{a}^{2}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }+2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{2}}}-{\frac{1}{2\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}}-2\,{\frac{\ln \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x)

[Out]

1/2/d/a^2*tan(1/2*d*x+1/2*c)+2/d/a^2*arctan(tan(1/2*d*x+1/2*c))-1/2/d/a^2/tan(1/2*d*x+1/2*c)-2/d/a^2*ln(tan(1/
2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [B]  time = 1.70309, size = 126, normalized size = 3.6 \begin{align*} \frac{\frac{4 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac{4 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac{\cos \left (d x + c\right ) + 1}{a^{2} \sin \left (d x + c\right )} + \frac{\sin \left (d x + c\right )}{a^{2}{\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/2*(4*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 - 4*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 - (cos(d*x + c
) + 1)/(a^2*sin(d*x + c)) + sin(d*x + c)/(a^2*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

Fricas [A]  time = 1.15895, size = 193, normalized size = 5.51 \begin{align*} \frac{d x \sin \left (d x + c\right ) + \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) - \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) - \cos \left (d x + c\right )}{a^{2} d \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

(d*x*sin(d*x + c) + log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - cos
(d*x + c))/(a^2*d*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*csc(d*x+c)**2/(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.37281, size = 99, normalized size = 2.83 \begin{align*} \frac{\frac{2 \,{\left (d x + c\right )}}{a^{2}} - \frac{4 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{2}} + \frac{4 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1}{a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/2*(2*(d*x + c)/a^2 - 4*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 + tan(1/2*d*x + 1/2*c)/a^2 + (4*tan(1/2*d*x + 1/2*
c) - 1)/(a^2*tan(1/2*d*x + 1/2*c)))/d